package com.design.pattern.component;

/**
 * 不要看了,这就是盒子里面那个小人,
 */
public class BoxPerson extends MagicBox {

    public BoxPerson(String name) {
        super(name);
    }
    public void open() {
        if (null == getName() || "".equals(getName())) {
            System.out.println("哇哦~没有人怎么打开盒子.");
        } else {
            System.out.println(getName() + "打开了盒子");

        }
    }

}
